﻿using System;

namespace change
{
    class Program
    {
 
        public static void GitChange(decimal money)
        {
            //面值
            decimal[] value = new decimal[] { 100m, 50m, 20m, 10m, 5m, 1m, 0.5m, 0.1m };
            //数量
            int[] number = new int[]{0, 0, 0, 0, 0, 0, 0, 0};
            //说明
            String[] explain = new string[]{"OneHundredYuan ", "FiftyYuan ","TwentyYuan ",
            "TenYuan ", "FiveYuan ", "OneYuan ", "FiveCents ", "Penny "};
 
            for (int i=0; i<value.Length; i++)
            {
                number[i] =(int)(money / value[i]);
                money %= value[i];
               
            }

            for(int i = 0; i < number.Length; i++)
            {
                if (number[i] != 0)
                Console.WriteLine(explain[i]+" = "+number[i]+"  piece");
            }

        }

    }
}
